﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
/*
    2012-2-17 David检查正常
 */
namespace Benefit.Service.Config
{
    /// <summary>
    /// 全局权限配置
    /// </summary>
    public class ServiceGlobalPrower : Benefit.Interface.Config.IGlobalPrower
    {
        Benefit.DB.DBManager db = null;
        public ServiceGlobalPrower(Benefit.DB.DBManager db)
        {
            this.db = db;
        }

        public bool AllowLogin()
        {
            //bool allow = false;
            //Common.Web.Cookie cookie = new Common.Web.Cookie();
            //string operatorid = cookie.GetCookie("LoginUserId");
            //if (!string.IsNullOrEmpty(operatorid))
            //{
            //    #region  登录权限判断

            //    #endregion
            //}
            //return allow;
            return true;
        }

        public bool HasPrower(string prowerName)
        {
            bool hasprower = false;
            //var query = db.GlobalPrower.Where(a => a.ProwerName.Equals(prowerName));
            //hasprower = query.First().IsAllow;
            return hasprower;
        }
    }
}